package com.ext.portlet.registration.service.impl;

import java.rmi.RemoteException;
import java.util.List;

import com.ext.portlet.registration.model.Staff;
import com.ext.portlet.registration.model.Teacher;
import com.ext.portlet.registration.service.base.StaffLocalServiceBaseImpl;
import com.ext.portlet.registration.service.persistence.StaffUtil;
import com.ext.portlet.registration.service.persistence.TeacherUtil;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;


public class StaffLocalServiceImpl extends StaffLocalServiceBaseImpl {

	public List<Staff> getAllStaffs()
	throws PortalException, SystemException, RemoteException {
		return staffPersistence.findAll();
	}
	
	public List<Staff> getByStatus(Integer status) throws SystemException{
		return StaffUtil.findByStatus(status);
	}
	
	public Staff staffValidation(Long collegeId, String employeeId) throws SystemException{
		
		return staffPersistence.fetchByStaffValidation(collegeId, employeeId);		
	}
	public Staff getByEmail(String emailAddress) throws SystemException{
		
		return staffPersistence.fetchByEmailAddress(emailAddress);
	}
	
	public Staff getByLoginId(String loginId) throws SystemException{		
		
		return StaffUtil.fetchByLoginId(loginId);
	}
	
	public List<Staff> getByStaffAndStatus(Long collegeId,Integer status) 
    throws SystemException{
	return staffPersistence.findByCollegeIdandStatus(collegeId, status);
	
}
	
}
